package com.victor.common.exception;


/**
 * 校验异常信息类
 */
public class ValidationException extends Exception {
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 7000209502999913863L;
    /**
     * 错误码
     */
    private String errCode;
    /**
     * 相关描述
     */
    private String message;

    public ValidationException() {
    }

    public ValidationException(String message) {
        this.message = message;
    }

    public ValidationException(String errCode, String message) {
        super(errCode + " : " + message);
        this.message = message;
        this.errCode = errCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return errCode + " : " + message;
    }
}
